-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Tenscan] health check UI on Tenscan #1719
Conversation
Important Auto Review SkippedAuto reviews are disabled on base/target branches other than the default branch. Please add the base/target branch pattern to the list of additional branches to be reviewed in the settings. Please check the settings in the CodeRabbit UI or the To trigger a single review, invoke the WalkthroughThe recent updates involve renaming a method in the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChat with CodeRabbit Bot (
|
export const useGeneralService = () => { | ||
const [noPolling, setNoPolling] = useState(false); | ||
|
||
const { | ||
data: testnetStatus, | ||
isLoading: isStatusLoading, | ||
refetch: refetchTestnetStatus, | ||
} = useQuery({ | ||
queryKey: ["testnetStatus"], | ||
queryFn: () => fetchTestnetStatus(), | ||
// refetchInterval: noPolling ? false : pollingInterval, | ||
}); | ||
|
||
return { testnetStatus, isStatusLoading, setNoPolling, refetchTestnetStatus }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The useGeneralService
hook is set up to fetch and provide the testnet status. However, the commented out refetchInterval
in line 15 suggests there might have been an intention to use polling which is currently not active. If polling is required, ensure that the pollingInterval
is defined and uncomment the line.
…nnifer/health-check-ui-on-tenscan
…nnifer/2624-add-a-health-indicator-for-testnet-on-tenscan-and-the-gateway
…scan-and-the-gateway' of https://github.com/ten-protocol/go-ten into jennifer/health-check-ui-on-tenscan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm - not sure if the error is somehting we want to display ? perhaps not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can another name be used for this ? Seems to be a bag of holding file.
export const fetchTestnetStatus = async (): Promise< | ||
ResponseDataInterface<any> | ||
> => { | ||
return await httpRequest<ResponseDataInterface<any>>({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we do anything with the error ooc ? Should we ?
…nnifer/2624-add-a-health-indicator-for-testnet-on-tenscan-and-the-gateway
…scan-and-the-gateway' of https://github.com/ten-protocol/go-ten into jennifer/health-check-ui-on-tenscan
Why this change is needed
Please provide a description and a link to the underlying ticket
https://github.com/ten-protocol/ten-internal/issues/2624
What changes were made as part of this PR
Please provide a high level list of the changes made
Health check UI on Tenscan
PR checks pre-merging
Please indicate below by ticking the checkbox that you have read and performed the required
PR checks